<style>
.extra-adminlist strong { color:#025A8D; font-size: 1.2em; font-weight: bold; }
table.extra-adminlist .extra-adminlist-tr td {background: #F7F7F7; }
.filter-detail { border-bottom: 1px solid #CCC; padding-bottom: 3px; font-size: 1.4em; }
.filter-detail span { color: #e72222; }
</style>
<script type="text/javascript">
jQuery(function(){
    
    jQuery("#statistic_by").html(jQuery("#statistic_by").html() + " <span style='color:#000;'>By age:</span> " + getSelectedOptionFilter("extra_age")); 
    jQuery("#statistic_by").html(jQuery("#statistic_by").html() + ". <span style='color:#000;'>By sex:</span> " + getSelectedOptionFilter("extra_sex")); 
    jQuery("#statistic_by").html(jQuery("#statistic_by").html() + ". <span style='color:#000;'>By Job Title/Position:</span> " + getSelectedOptionFilter("extra_position")); 
    jQuery("#statistic_by").html(jQuery("#statistic_by").html() + ". <span style='color:#000;'>By Location:</span> " + getSelectedOptionFilter("extra_district")); 
    
});

function getSelectedOptionFilter(listName)
{
    var html = "";
    jQuery("#"+listName+" option[selected=selected]").each(function(){
        html = html + jQuery(this).html() + ", ";
    });
    return html.substring(0, html.length-2);
}
</script>
<h3>
<span id="statistic_by"></span>
<span style="color:#C00; float:right;">Total: <?php echo $this->pagination->total; ?></span>

</h3>
<table class="adminlist extra-adminlist table">
  <thead>
    <tr class="extra-adminlist-tr">
        <th><strong>Member ID</strong></th>        
        <th><strong>Name</strong></th>        
        <th><strong>Phone</strong></th>        
        <th><strong>Email</strong></th>        
        <th><strong>Date of birth</strong></th>  
        <th><strong>Job</strong></th>   
        <th><strong>Company Name</strong></th>
        <th><strong>Location</strong></th>          
        <th><strong>Gender</strong></th> 
        <th><strong>Created Date</strong></th> 
		<th><strong>Reapply Date</strong></th> 		
    </tr>
  </thead>
  <tbody>
    
    <?php 
        foreach($this->items as $key => $item):
            echo '<tr class="row'.($key%2).'">';
                echo '<td nowrap="nowrap" style="width:10%;">V'.$item->member_id.'</td>';   
                echo '<td nowrap="nowrap"><a target="_blank" href="index.php?option=com_wrd&controller=profile&id='.$item->id.'&layout=form">'.$item->l_name.' '.$item->f_name.'</a></td>';   
                echo '<td nowrap="nowrap">'.$item->phone.'</td>';   
                echo '<td nowrap="nowrap">'.$item->email.'</td>';   
                echo '<td nowrap="nowrap">'.(strtotime($item->dob) ? date("d-m-Y",strtotime($item->dob)) : "" ).'</td>';   
                echo '<td nowrap="nowrap">'.$item->job.'</td>';   
                echo '<td nowrap="nowrap">'.$item->company.'</td>';   
                echo '<td nowrap="nowrap">'.$item->distric.'</td>';   
                echo '<td nowrap="nowrap">'.ucfirst($item->gender).'</td>';   
                echo '<td nowrap="nowrap">'.(strtotime($item->created_date)?date("d-m-Y",strtotime($item->created_date)) : "") .'</td>';
				echo '<td nowrap="nowrap">'.(strtotime($item->reapply_date)? date("d-m-Y H:i:s",strtotime($item->reapply_date)) : "").'</td>';				
            echo '</tr>';
        endforeach;
    ?>
  </tbody>
  <tfoot>
        <tr>
            <td colspan="16"><?php echo $this->pagination->getListFooter();?></td>
        </tr>
    </tfoot>
</table>